#include "maindefs.h"
#include <stdio.h>
#include "messages.h"
#include "timer1_thread.h"
#include "my_uart.h"

unsigned char testmsg[MSGLEN];

void init_timer1_lthread(timer1_thread_struct *tptr) {
    tptr->msgcount = 0;
}

// This is a "logical" thread that processes messages from TIMER1
// It is not a "real" thread because there is only the single main thread
// of execution on the PIC because we are not using an RTOS.

int timer1_lthread(timer1_thread_struct *tptr, int msgtype, int length, unsigned char *msgbuffer) {
    signed char retval;

    //send test sequence over uart
    tptr->msgcount++;
    /*testmsg[0] = 'A';
    testmsg[1] = 'B';
    testmsg[2] = 'C';
    uart_send(3, testmsg);*/
}